home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / THINK Power 1.0b4 / Extensions Src / Hello World.c next >
C/C++ Source or Header  |  1993-12-07  |  414b  |  25 lines

  1. // HelloWorld.c - Written by Stefan Arentz, August 1993
  2.  
  3. #include "THINK Power Extensions.h"
  4.  
  5. pascal void main(TPCallbackBlock *theCallbacks, WindowPtr theWindow) {
  6.  
  7.     char                *s = "Hello World!\r";
  8.     Handle                h;
  9.     WindowPtr            newWindow;
  10.  
  11.     if (newWindow = theCallbacks->NewDocument()) {
  12.  
  13.         if (h = NewHandle(13)) {
  14.  
  15.             BlockMove(s, *h, 13);
  16.             
  17.             (void) theCallbacks->Paste(h);
  18.             
  19.             DisposeHandle(h);
  20.         }
  21.  
  22.     }
  23.     
  24. }
  25.